<?php
namespace app\api\controller;

use app\common\lib\Export;
use app\common\lib\Request;
use think\Exception;

class Index extends Base
{
    private $cmd_data = [
    ];

    public function index()
    {
        try{
            // 检验登录情况
            parent::check_user_info();

            $cmd = Request::get('cmd');
            $method = $this->cmd_data[$cmd];
            $this->$method();
        }catch (Exception $e){
            Export::exp_err($e->getMessage(),$e->getCode());
        }
        return '';
    }
}
